package com.hzcx.app.simplechat.ui.home;

import androidx.fragment.app.Fragment;

import com.hyphenate.EMGroupChangeListener;
import com.hyphenate.chat.EMMucSharedFile;

import java.util.List;

public class HXGroupMessageListener implements EMGroupChangeListener {

    public HXGroupMessageRefreshInterface messageFragment;

    @Override
    public void onInvitationReceived(String s, String s1, String s2, String s3) {
        messageFragment.groupRefresh(s);
    }

    @Override
    public void onRequestToJoinReceived(String s, String s1, String s2, String s3) {
        messageFragment.groupRefresh(s);
    }

    @Override
    public void onRequestToJoinAccepted(String s, String s1, String s2) {
        messageFragment.groupRefresh(s);
    }

    @Override
    public void onRequestToJoinDeclined(String s, String s1, String s2, String s3) {
        messageFragment.groupRefresh(s);
    }

    @Override
    public void onInvitationAccepted(String s, String s1, String s2) {
        messageFragment.groupRefresh(s);
    }

    @Override
    public void onInvitationDeclined(String s, String s1, String s2) {
        messageFragment.groupRefresh(s);
    }

    @Override
    public void onUserRemoved(String s, String s1) {
        messageFragment.groupMemberRemove(s, s1);
    }

    @Override
    public void onGroupDestroyed(String s, String s1) {
        messageFragment.groupDestroyed(s);
    }

    @Override
    public void onAutoAcceptInvitationFromGroup(String groupId, String inviter, String inviteMessage) {
        messageFragment.groupRefresh(groupId);
    }

    @Override
    public void onMuteListAdded(String s, List<String> list, long l) {
        messageFragment.groupRefresh(s);
    }

    @Override
    public void onMuteListRemoved(String s, List<String> list) {
        messageFragment.groupRefresh(s);
    }

    @Override
    public void onWhiteListAdded(String s, List<String> list) {
        messageFragment.groupRefresh(s);
    }

    @Override
    public void onWhiteListRemoved(String s, List<String> list) {
        messageFragment.groupRefresh(s);
    }

    @Override
    public void onAllMemberMuteStateChanged(String s, boolean b) {
        messageFragment.groupRefresh(s);
    }

    @Override
    public void onAdminAdded(String s, String s1) {
        messageFragment.groupRefresh(s);
    }

    @Override
    public void onAdminRemoved(String s, String s1) {
        messageFragment.groupRefresh(s);
    }

    @Override
    public void onOwnerChanged(String s, String s1, String s2) {
        messageFragment.groupRefresh(s);
    }

    @Override
    public void onMemberJoined(String s, String s1) {
        messageFragment.groupRefresh(s);
    }

    @Override
    public void onMemberExited(String s, String s1) {
        messageFragment.groupMemberRemove(s, s1);
    }

    @Override
    public void onAnnouncementChanged(String s, String s1) {
        messageFragment.groupRefresh(s);
    }

    @Override
    public void onSharedFileAdded(String s, EMMucSharedFile emMucSharedFile) {
//        homeFragment.refresh();
    }

    @Override
    public void onSharedFileDeleted(String s, String s1) {
//        homeFragment.refresh();
    }
}
